// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 修改通知公告 PUT /api/system/notice */
export async function noticeEditUsingPUT(body: API.SysNotice, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/notice', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增通知公告 POST /api/system/notice */
export async function noticeAddUsingPOST(body: API.SysNotice, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/notice', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除通知公告 DELETE /api/system/notice/${param0} */
export async function noticeRemoveUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.noticeRemoveUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { noticeIds: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/notice/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 根据通知公告编号获取详细信息 GET /api/system/notice/${param0} */
export async function noticeGetInfoUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.noticeGetInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  const { noticeId: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/notice/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取通知公告列表 GET /api/system/notice/list */
export async function noticeListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.noticeListUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.TableDataInfo>('/api/system/notice/list', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}
